# -*- coding:utf-8 -*-

from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.views.generic.simple import direct_to_template
from django.core.urlresolvers import reverse

def portal(request,user_id):
    """
    """
    if request.method == 'GET':
        print request.session.get('user_id',None)
        if request.session.get('user_id',None) == None:
            return HttpResponseRedirect('/')
        return direct_to_template(request,'portal.html',{"user_id":user_id})
    elif request.method == 'POST':
        id = request.POST["name"]
        pwd = request.POST["password"]
        

